home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat1 / colltbl.z / colltbl
Encoding:
Text File  |  2002-10-03  |  17.4 KB  |  264 lines

  1.  
  2.  
  3.  
  4. ccccoooollllllllttttbbbbllll((((1111MMMM))))                                                        ccccoooollllllllttttbbbbllll((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _cccc_oooo_llll_llll_tttt_bbbb_llll - create collation database
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _cccc_oooo_llll_llll_tttt_bbbb_llll [ _f_i_l_e | _---- ]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The _cccc_oooo_llll_llll_tttt_bbbb_llll command takes as input a specification file, _f_i_l_e, that
  16.      describes the collating sequence for a particular language and creates a
  17.      database that can be read by _ssss_tttt_rrrr_xxxx_ffff_rrrr_mmmm(3C) and _ssss_tttt_rrrr_cccc_oooo_llll_llll(3C).  _ssss_tttt_rrrr_xxxx_ffff_rrrr_mmmm(3C)
  18.      transforms its first argument and places the result in its second
  19.      argument.  The transformed string is such that it can be correctly
  20.      ordered with other transformed strings by using _ssss_tttt_rrrr_cccc_mmmm_pppp(3C), _ssss_tttt_rrrr_nnnn_cccc_mmmm_pppp(3C),
  21.      or _mmmm_eeee_mmmm_cccc_mmmm_pppp(3C).  _ssss_tttt_rrrr_cccc_oooo_llll_llll(3C) transforms its arguments and does a
  22.      comparison.
  23.  
  24.      If no input file is supplied, _s_t_d_i_n is read.
  25.  
  26.      The output file produced contains the database with collating sequence
  27.      information in a form usable by system commands and routines.  The name
  28.      of this output file is the value you assign to the keyword _cccc_oooo_dddd_eeee_ssss_eeee_tttt read
  29.      in from _f_i_l_e.  Before this file can be used, it must be installed in the
  30.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee/_l_o_c_a_l_e directory with the name _LLLL_CCCC______CCCC_OOOO_LLLL_LLLL_AAAA_TTTT_EEEE by someone who
  31.      is super-user or a member of group _bbbb_iiii_nnnn.  _l_o_c_a_l_e corresponds to the
  32.      language area whose collation sequence is described in _f_i_l_e.  This file
  33.      must be readable by user, group, and other; no other permissions should
  34.      be set.  To use the collating sequence information in this file, set the
  35.      _LLLL_CCCC______CCCC_OOOO_LLLL_LLLL_AAAA_TTTT_EEEE environment variable appropriately [see _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5) or
  36.      _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C)].
  37.  
  38.      The _cccc_oooo_llll_llll_tttt_bbbb_llll command can support languages whose collating sequence can be
  39.      completely described by the following cases:
  40.  
  41.      +o   Ordering of single characters within the code set.  For example, in
  42.          Swedish, _VVVV is sorted after _UUUU, before _XXXX, and with _WWWW (_VVVV and _WWWW are
  43.          considered identical as far as sorting is concerned).
  44.  
  45.      +o   Ordering of ``double characters'' in the collation sequence.  For
  46.          example, in Spanish, _cccc_hhhh and _llll_llll are collated after _cccc and _llll,
  47.          respectively.
  48.  
  49.      +o   Ordering of a single character as if it consists of two characters.
  50.          For example, in German, the ``sharp s,'' _BBBB, is sorted as _ssss_ssss.  This is
  51.          a special instance of the next case below.
  52.  
  53.      +o   Substitution of one character string with another character string.
  54.          In the example above, the string _BBBB is replaced with _ssss_ssss during
  55.          sorting.
  56.  
  57.      +o   Ignoring certain characters in the code set during collation.  For
  58.          example, if _---- were ignored during collation, then the strings
  59.          _rrrr_eeee_----_llll_oooo_cccc_aaaa_tttt_eeee and _rrrr_eeee_llll_oooo_cccc_aaaa_tttt_eeee would compare as equal.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccoooollllllllttttbbbbllll((((1111MMMM))))                                                        ccccoooollllllllttttbbbbllll((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      +o   Secondary ordering between characters.  In the case where two
  75.          characters are sorted together in the collation sequence, (that is,
  76.          they have the same "primary" ordering), there is sometimes a
  77.          secondary ordering that is used if two strings are identical except
  78.          for characters that have the same primary ordering.  For example, in
  79.          French, the letters _eeee and _eeee_```` have the same primary ordering but _eeee
  80.          comes before _eeee_```` in the secondary ordering.  Thus the word _llll_eeee_vvvv_eeee_rrrr would
  81.          be ordered before _llll_eeee_````_vvvv_eeee_rrrr, but _llll_eeee_````_vvvv_eeee_rrrr would be sorted before _llll_eeee_vvvv_iiii_tttt_aaaa_tttt_eeee.
  82.          (Note that if _eeee came before _eeee_```` in the primary ordering, then _llll_eeee_````_vvvv_eeee_rrrr
  83.          would be sorted after _llll_eeee_vvvv_iiii_tttt_aaaa_tttt_eeee.)
  84.  
  85.      The specification file consists of three types of statements:
  86.  
  87.      1.  _cccc_oooo_dddd_eeee_ssss_eeee_tttt   _f_i_l_e_n_a_m_e
  88.  
  89.          _f_i_l_e_n_a_m_e is the name of the output file to be created by _cccc_oooo_llll_llll_tttt_bbbb_llll.
  90.  
  91.      2.  _oooo_rrrr_dddd_eeee_rrrr _iiii_ssss  _o_r_d_e_r__l_i_s_t
  92.  
  93.          _o_r_d_e_r__l_i_s_t is a list of symbols, separated by semicolons, that
  94.          defines the collating sequence.  The special symbol, _...._...._...., specifies
  95.          symbols that are lexically sequential in a short-hand form.  For
  96.          example,
  97.               _oooo_rrrr_dddd_eeee_rrrr _iiii_ssss  _aaaa_;;;;_bbbb_;;;;_cccc_;;;;_dddd_;;;;_...._...._...._;;;;_xxxx_;;;;_yyyy_;;;;_zzzz
  98.  
  99.          would specify the list of lowercase letters.  Of course, this could
  100.          be further compressed to just _aaaa_;;;;_...._...._...._;;;;_zzzz.
  101.  
  102.          A symbol can be up to two bytes in length and can be represented in
  103.          any one of the following ways:
  104.  
  105.          +o   the symbol itself (for example, _aaaa for the lowercase letter _aaaa),
  106.  
  107.          +o   in octal representation (for example, _\\\\_1111_4444_1111 or _0000_1111_4444_1111 for the letter
  108.              _aaaa), or
  109.  
  110.          +o   in hexadecimal representation (for example, _\\\\_xxxx_6666_1111 or _0000_xxxx_6666_1111 for the
  111.              letter _aaaa).
  112.  
  113.          Any combination of these may be used as well.
  114.  
  115.          The backslash character, _\\\\ , is used for continuation.  No characters
  116.          are permitted after the backslash character.
  117.  
  118.          Symbols enclosed in parentheses are assigned the same primary
  119.          ordering but different secondary ordering.  Symbols enclosed in curly
  120.          brackets are assigned only the same primary ordering.  For example,
  121.  
  122.  
  123.               _oooo_rrrr_dddd_eeee_rrrr _iiii_ssss  _aaaa_;;;;_bbbb_;;;;_cccc_;;;;_cccc_hhhh_;;;;_dddd_;;;;_((((_eeee_;;;;_eeee_````_))))_;;;;_ffff_;;;;_...._...._...._;;;;_zzzz_;;;;_\\\\
  124.                         _{{{{_1111_;;;;_...._...._...._;;;;_9999_}}}}_;;;;_AAAA_;;;;_...._...._...._;;;;_ZZZZ
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ccccoooollllllllttttbbbbllll((((1111MMMM))))                                                        ccccoooollllllllttttbbbbllll((((1111MMMM))))
  137.  
  138.  
  139.  
  140.          In the above example, _eeee and _eeee_```` are assigned the same primary ordering
  141.          and different secondary ordering, digits 1 through 9 are assigned the
  142.          same primary ordering and no secondary ordering.  Only primary
  143.          ordering is assigned to the remaining symbols.  Notice how double
  144.          letters can be specified in the collating sequence (letter _cccc_hhhh comes
  145.          between _cccc and _dddd).
  146.  
  147.          If a character is not included in the _oooo_rrrr_dddd_eeee_rrrr _iiii_ssss statement, it is
  148.          excluded from the ordering and will be ignored during sorting.
  149.  
  150.      3.  _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _s_t_r_i_n_g _wwww_iiii_tttt_hhhh _r_e_p_l
  151.  
  152.          The _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee statement substitutes the string _s_t_r_i_n_g with the
  153.          string _r_e_p_l.  This can be used, for example, to provide rules to sort
  154.          the abbreviated month names numerically:
  155.  
  156.  
  157.               _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_JJJJ_aaaa_nnnn_"""" _wwww_iiii_tttt_hhhh _""""_0000_1111_""""
  158.               _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_FFFF_eeee_bbbb_"""" _wwww_iiii_tttt_hhhh _""""_0000_2222_""""
  159.                    _....
  160.                    _....
  161.                    _....
  162.               _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_DDDD_eeee_cccc_"""" _wwww_iiii_tttt_hhhh _""""_1111_2222_""""
  163.  
  164.          A simpler use of the _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee statement would be to substitute a
  165.          single character with two characters, as with the substitution of _BBBB
  166.          with _ssss_ssss in German.
  167.  
  168.      The _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee statement is optional.  The _oooo_rrrr_dddd_eeee_rrrr _iiii_ssss and _cccc_oooo_dddd_eeee_ssss_eeee_tttt
  169.      statements must appear in the specification file.
  170.  
  171.      Any lines in the specification file with a _#### in the first column are
  172.      treated as comments and are ignored.  Empty lines are also ignored.
  173.  
  174. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  175.      The following example shows the collation specification required to
  176.      support a hypothetical telephone book sorting sequence.
  177.  
  178.      The sorting sequence is defined by the following rules:
  179.  
  180.      a.Upper- and lowercase letters must be sorted together, but uppercase
  181.        letters have precedence over lowercase letters.
  182.  
  183.      b.All special characters and punctuation should be ignored.
  184.  
  185.      c.Digits must be sorted as their alphabetic counterparts (for example, _0000
  186.        as _zzzz_eeee_rrrr_oooo, _1111 as _oooo_nnnn_eeee).
  187.  
  188.      d.The _CCCC_hhhh, _cccc_hhhh, _CCCC_HHHH combinations must be collated between _CCCC and _DDDD.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ccccoooollllllllttttbbbbllll((((1111MMMM))))                                                        ccccoooollllllllttttbbbbllll((((1111MMMM))))
  203.  
  204.  
  205.  
  206.      e._VVVV and _WWWW, _vvvv and _wwww must be collated together.
  207.  
  208.      The input specification file to _cccc_oooo_llll_llll_tttt_bbbb_llll will contain:
  209.  
  210.  
  211.                _cccc_oooo_dddd_eeee_ssss_eeee_tttt   _tttt_eeee_llll_eeee_pppp_hhhh_oooo_nnnn_eeee
  212.                _oooo_rrrr_dddd_eeee_rrrr _iiii_ssss  _AAAA_;;;;_aaaa_;;;;_BBBB_;;;;_bbbb_;;;;_CCCC_;;;;_cccc_;;;;_CCCC_HHHH_;;;;_CCCC_hhhh_;;;;_cccc_hhhh_;;;;_DDDD_;;;;_dddd_;;;;_EEEE_;;;;_eeee_;;;;_FFFF_;;;;_ffff_;;;;_\\\\
  213.                          _GGGG_;;;;_gggg_;;;;_HHHH_;;;;_hhhh_::::_IIII_;;;;_iiii_;;;;_JJJJ_;;;;_jjjj_;;;;_KKKK_;;;;_kkkk_;;;;_LLLL_;;;;_llll_;;;;_MMMM_;;;;_mmmm_;;;;_NNNN_;;;;_nnnn_;;;;_OOOO_;;;;_oooo_;;;;_PPPP_;;;;_pppp_;;;;_\\\\
  214.                          _QQQQ_;;;;_qqqq_;;;;_RRRR_;;;;_rrrr_;;;;_SSSS_;;;;_ssss_;;;;_TTTT_;;;;_tttt_;;;;_UUUU_;;;;_uuuu_;;;;_{{{{_VVVV_;;;;_WWWW_}}}}_;;;;_{{{{_vvvv_;;;;_wwww_}}}}_;;;;_XXXX_;;;;_xxxx_;;;;_YYYY_;;;;_yyyy_;;;;_ZZZZ_;;;;_zzzz
  215.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_0000_"""" _wwww_iiii_tttt_hhhh _""""_zzzz_eeee_rrrr_oooo_""""
  216.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_1111_"""" _wwww_iiii_tttt_hhhh _""""_oooo_nnnn_eeee_""""
  217.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_2222_"""" _wwww_iiii_tttt_hhhh _""""_tttt_wwww_oooo_""""
  218.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_3333_"""" _wwww_iiii_tttt_hhhh _""""_tttt_hhhh_rrrr_eeee_eeee_""""
  219.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_4444_"""" _wwww_iiii_tttt_hhhh _""""_ffff_oooo_uuuu_rrrr_""""
  220.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_5555_"""" _wwww_iiii_tttt_hhhh _""""_ffff_iiii_vvvv_eeee_""""
  221.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_6666_"""" _wwww_iiii_tttt_hhhh _""""_ssss_iiii_xxxx_""""
  222.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_7777_"""" _wwww_iiii_tttt_hhhh _""""_ssss_eeee_vvvv_eeee_nnnn_""""
  223.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_8888_"""" _wwww_iiii_tttt_hhhh _""""_eeee_iiii_gggg_hhhh_tttt_""""
  224.                _ssss_uuuu_bbbb_ssss_tttt_iiii_tttt_uuuu_tttt_eeee _""""_9999_"""" _wwww_iiii_tttt_hhhh _""""_nnnn_iiii_nnnn_eeee_""""
  225.  
  226. FFFFIIIILLLLEEEESSSS
  227.      _////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______CCCC_OOOO_LLLL_LLLL_AAAA_TTTT_EEEE
  228.                      _LLLL_CCCC______CCCC_OOOO_LLLL_LLLL_AAAA_TTTT_EEEE database for _l_o_c_a_l_e
  229.  
  230.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_CCCC_////_cccc_oooo_llll_llll_tttt_bbbb_llll______CCCC
  231.                      input file used to construct _LLLL_CCCC______CCCC_OOOO_LLLL_LLLL_AAAA_TTTT_EEEE in the default
  232.                      locale.
  233.  
  234. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  235.      _mmmm_eeee_mmmm_oooo_rrrr_yyyy(3C), _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C), _ssss_tttt_rrrr_cccc_oooo_llll_llll(3C), _ssss_tttt_rrrr_iiii_nnnn_gggg(3C), _ssss_tttt_rrrr_xxxx_ffff_rrrr_mmmm(3C),
  236.      _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                                                         PPPPaaaaggggeeee 4444
  261.  
  262.  
  263.  
  264.